public class ListDeleteIndex {
    public static void main(String[] args) {
        Node head = new Node("0");
        Node current = head;
        for (int i = 1; i < 10; i++) {
            Node newNode = new Node(i + "");
            current.next = newNode;
            current = newNode;
        }

        Node node = deleteListIndex(head, 1);
        System.out.println(node);
    }

    public static Node deleteListIndex(Node head, int index) {

        Node Head=new Node("0");
        Head.next=head;
        Node first=Head;
        Node second=Head;
        for(int i=0;i<index+1;i++){
            first=first.next;
        }
        while(first!=null){
            first=first.next;
            second=second.next;
        }
        second.next=second.next.next;
        return Head.next;

    }
    
}
